<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">

#navigate ul{list-style:none; padding:0px;}
#navigate li{ float:left; text-align:center; cursor:pointer; width:50px;}
#navigate li.selecteda{ background:#ccc; color:#fff}
#navigatebox{clear:both;}
.hidex{display:none;}
</style>
<script type="text/javascript" src="jquery-1.11.2.min.js"></script>
</head>

<body>

<div id="navigate">
	  <ul>
		<li class="selecteda">国际</li>
		<li>国内</li>
		<li>我家</li>
	  </ul>
<!---------------->     
	<div id="navigatebox">
	  <div>国际的新闻啊</div>
	  <div class="hidex">国内的新闻啊</div>
	  <div class="hidex">我的家乡非常美啊</div>
	</div>
</div>

<script type="text/javascript">
       var $div_li = $("#navigate ul li");
       $div_li.hover(function(){
              $(this).addClass("selecteda").siblings().removeClass("selecteda");
              var div_index = $div_li.index(this);
              $("#navigatebox>div").eq(div_index).show().siblings().hide();
       }).hover(function(){
              $(this).addClass("hover");
       },function(){
              $(this).removeClass("hover");
       });
</script>

</body>
</html>
